﻿function getzahl (text){
	var z="";
	
	if (text=="0"){
		z=0;
		return z;
	}
	else if (text=="1"){
		z=1;
		return z;//$(""+scroll).text(z).show();
	}
	else if (text=="2"){
		z=2;
		return z;
	}
	else if (text=="3"){
		z=3;
		return z;
	}
	else if (text=="4"){
		z=4;
		return z;
	}
	else if (text=="5"){
		z=5;
		return z;
	}
	else if (text=="6"){
		z=6;
		return z;
	}
	else if (text=="7"){
		z=7;
		return z;
	}
	else if (text=="8"){
		z=3;
		return z;
	}
	else if (text=="9"){
		z=9;
		return z;
	}

}

/***
***/

function choosemeal(text){
	if( text == "Vorspeise"){// if Button Vorspeise is clicked
		$("#ape1").show();
		$("#w1").hide();
		$("#so1").hide();
		$("#hot1").hide();
		$( "#bw1" ).hide();
		$( "#ma1" ).hide();
		$( "#des1" ).hide();
	}
	else if(text == "Hauptspeise"){ // if Button OK is clicked
		$("#ape1").hide();
		$("#w1").hide();
		$("#so1").hide();
		$("#hot1").hide();
		$( "#bw1" ).hide();
		$( "#ma1" ).show();
		$( "#des1" ).hide();
	}else if( text == "Saisonkarte"){ // if Button OK is clicked
		$("#fenster2").load('hauptspeise.php');
	}
	else if( text == "Nachspeise"){ // if Button OK is clicked
		$("#bw1").hide();
		$("#so1").hide();
		$("#w1").hide();
		$("#ape1").hide();
		$( "#hot1" ).hide();
		$( "#ma1" ).hide();
		$( "#des1" ).show();
	}
	else if( text == "Wasser/Säfte"){ // if Button OK is clicked
		$("#w1" ).show();
		$("#so1").hide();
		$("#ape1" ).hide();
		$("#hot1" ).hide();
		$( "#bw1" ).hide();
		$( "#ma1" ).hide();
		$( "#des1" ).hide();
	}
	else if( text == "Softdrink"){ // if Button OK is clicked
		$("#so1").show();
		$("#w1").hide();
		$("#ape1").hide();
		$("#hot1").hide();
		$( "#bw1" ).hide();
		$( "#ma1" ).hide();
		$( "#des1" ).hide();
	}
	else if( text == "Hotdrink"){ // if Button OK is clicked
		$("#hot1").show();
		$("#so1").hide();
		$("#w1").hide();
		$("#ape1").hide();
		$( "#bw1" ).hide();
		$( "#ma1" ).hide();
		$( "#des1" ).hide();
	}
	else if( text == "Bier/Wein"){ // if Button OK is clicked
		$("#bw1").show();
		$("#so1").hide();
		$("#w1").hide();
		$("#ape1").hide();
		$( "#hot1" ).hide();
		$( "#ma1" ).hide();
		$( "#des1" ).hide();
	}
	else if( text == "Cocktail/Longdrink"){ // if Button OK is clicked
		$("#fenster2").load('cocktail.php');
	}
	else if( text == "Mittag"){ // if Button OK is clicked
		$("#fenster2").load('cocktail.php');
	}
	else if(text == "ABBRECHEN"){ // if Button OK is clicked
		document.location= "bearbeitung.php";
	}

}


/**
**/

function showInScroll(menge,gericht,preis) {
			var text="<table class='table'>";
			for (var i=0; i<menge.length;i++){
				 text= text+"<tr class= 'success'><td>"+menge[i]+"</td> <td>"+gericht[i]+"</td><td>"+preis[i]+"</td></tr>";
			}
			text=text+"</table>";
			return text;
		}
